package com.project2.controller;

import com.project2.bean.ResultVo;
import com.project2.bean.po.MarketStorage;
import com.project2.service.WxStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author : bunnyupup
 * @description :
 * @date : Created in 2022/8/15 16:39
 */
@RestController
@RequestMapping("wx")
public class WxStorageController {
    @Autowired
    WxStorageService wxStorageService;

    @RequestMapping("storage/upload")
    public ResultVo fileUpload(@RequestParam("file") MultipartFile myFile){
        MarketStorage addpic = wxStorageService.addpic(myFile);
        return ResultVo.ok(addpic);

    }
}
